// SETUP

#include intrographics.txt
#include ladyluckbiggraphics.txt

setdatapath("data/graphics/cutscenes/thief/");

var thiefgraphics = {
	idle: {
		animation: "thief_idle.json",
		pack: "thief.pck",
		loop: true
	},
	worried_idle: {
		animation: "thief_worried_idle.json",
		pack: "thief.pck",
		loop: true
	}
}
var thief = addsprite("thief", 1, thiefgraphics);

// HELPER FUNCTIONS	

var fade_time = 0.4;

// ACTORS
actor("Lady Luck", screenwidthmid + 800, 550, Col.YELLOW, CENTER, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
actor("Thief", 2600, 780, Col.multiplylightness(Col.GREEN, 1.25), CENTER, BOTTOM, "chat_thief", "characters/thief/charicon_thief");

// INTRO

play("music_cutscene_dark");

thief.scale = 0.5;
thief.x = 2620 - ((thief.getwidth("idle") * thief.scale) / 2);
thief.y = 890;
changebackground("intro_stage");
fadein();
thief.show("idle");

ladyluck_big.x = -screenwidth;
ladyluck_big.show("idle");
Actuate.tween(ladyluck_big, 2, { x: 0 }).ease(Expo.easeOut);

wait(0.5);

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "How are you doing, my dear?");
speak("Lady Luck", "You’re the little realist of your group - are you|going to be the first to see sense and give up?");
speak("Lady Luck", "It’s not so bad, being a minion - we’ve got a ball pit in the staff|room, and there are free muffins in the kitchen every morning!");
ladyluck_big.show("idle", true);

speak("Thief", "None of us are going to give up.");
speak("Thief", "We came to win, and we’re going to do it.");
speak("Thief", "All of us.");

ladyluck_big.show("talking-sly", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "What a strange time for you to develop a|sense of solidarity, my dear!");
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
ladyluck_big.show("talking-sly", true);
speak("Lady Luck", "Perhaps this will make you reconsider:");
speak("Lady Luck", "If you give up first, I’ll let you spend a whole|hour outside the Dungeons every year.");
speak("Lady Luck", "That'll make your eternal imprisonment|sting even more sweetly.");
ladyluck_big.show("idle-sly", true);

thief.show("worried_idle");
speak("Thief", "...that’s not even a good offer!|That’s a terrible offer!");
speak("Thief", "Also: no!");

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Oh, it's definitely a dreadful offer!");
ladyluck_big.show("talking-scary", true);
speak("Lady Luck", "But by the time this is over, you might|just wish you’d taken it...");
ladyluck_big.show("idle-scary", true);

startgamefromcutscene();